package com.work.xxzl.httpretrofit;

import com.google.gson.annotations.SerializedName;

/**
 * author: Wangzhan
 * date :2018/9/28 16:26
 * version:1.0
 * description:
 */

//HttpStatus.java
public class HttpStatus {
//    {"status":"400","msg":"非法参数-0","data":""}
    @SerializedName("status")
    private int status;
    @SerializedName("msg")
    private String msg;

    public int getStatus() {
        return status;
    }

    public String getMsg() {
        return msg;
    }

    /**
     * API是否请求失败
     *
     * @return 失败返回true, 成功返回false
     */
    public boolean isCodeInvalid() {
        return status != Constants.WEB_RESP_CODE_SUCCESS;
    }
}

